<?php
/******************** 订单操作记录 *******************/

namespace app\admin\controller;
use app\common\server\OrderRecode;


class RecordOrder extends Common
{
    public function index()
    {
        if (input('get.name')) {
            $this->map[] = ['admin_user_name|edit_order_num|admin_user_phone', 'like', '%'.input('get.name').'%'];
        }
        if (is_numeric(input('get.or_status'))) {
            $this->map[] = ['admin_user_identity', '=', input('get.or_status')];
        }
        if (input('get.start') && input('get.end') == "") {
            $this->map[] = ['edit_time', '>=', input('get.start')];
        }
        if (input('get.start') == "" && input('get.end')) {
            $this->map[] = ['edit_time', '=<', input('get.end')];
        }
        if (input('get.start') && input('get.end')) {
            $this->map[] = ['edit_time', 'between', array(input('get.start'), input('get.end'))];
        }

        $show_data = model('recording')->show($this->map);

        $this->assign('list',$show_data);
          return view();

    }

}